// import {Res} from "./constants/res";
// import {ResEnum} from "./enum/resEnum";

const a = `abc`;
console.log(a);

const obj = {
    name: "Bob",
    age: 18,
};

function getVal<T, K extends keyof T>(o: T, k: K) {
    return o[k];
}

const v = getVal(obj, "name");
console.log(v);

function Ta(t: any) {
    console.log(t.constructor);
}

@Ta
class P {
    constructor(public name: string, private age: number) {
    }

    getName() {
        return this.name;
    }

    getAge() {
        return this.age;
    }
}

const xm = new P("小明", 18);
console.log(`人的姓名：${xm.getName()}`);
console.log(`人的年龄：${xm.getAge()}`);
